from django.conf.urls.defaults import *
from piston.resource import Resource
from login.handlers import LoginHandler

class CsrfExemptResource( Resource ):
    def __init__( self, handler, authentication = None ):
        super( CsrfExemptResource, self ).__init__( handler, authentication )
        self.csrf_exempt = getattr( self.handler, 'csrf_exempt', True )

login_resource = CsrfExemptResource( LoginHandler )

urlpatterns = patterns( '',
    url( r'^(?P<querystring>.*)$', login_resource )
)